package wint.session.servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpSession;

public class WintSessionHttpServletRequest extends HttpServletRequestWrapper implements HttpServletRequest {

	private WintHttpSession wintHttpSession;
	
	public WintSessionHttpServletRequest(HttpServletRequest request) {
		super(request);
	}

	public void setWintHttpSession(WintHttpSession wintHttpSession) {
		this.wintHttpSession = wintHttpSession;
	}

	@Override
	public HttpSession getSession(boolean create) {
		return wintHttpSession;
	}

	@Override
	public HttpSession getSession() {
		return getSession(true);
	}

	@Override
	public boolean isRequestedSessionIdValid() {
		return true;
	}

	@Override
	public boolean isRequestedSessionIdFromCookie() {
		return true;
	}

	@Override
	public boolean isRequestedSessionIdFromURL() {
		return false;
	}

	@Override
	public boolean isRequestedSessionIdFromUrl() {
		return false;
	}

}
